<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        //索引数组
        $id[]=11;
        $id[]=14;
        $id[]=18;
        $id[]=9;
        var_dump($id);
        echo '<br>';
        $count=count($id);
        for($i=0;$i<$count;$i++){
            echo $id[$i];
            echo "<br>";
        }
        foreach ($id as $key => $value) {
            echo "$key $value<br>";
        }
        //关联数组
        $index[18]=18;
        $index[3]=3;
        $index[7]=7;
        $index[9]=9;
        $index[12]=12;
        $index[16]=16;
        var_dump($index);
        echo '<br>';
        foreach ($index as $key => $value) {
           echo "$key $value<br>";  
        }
         echo '<br>';
        $num[]=1;
        $num[]=3;
        $num[]=2;
        $num[]=1;
       
        foreach ($num as $key => $value) {
           echo "$key $value<br>";  
        }
        echo '<br>'; 
        
        foreach ($num as $key => $value) {
           echo "$id[$key] $value<br>";   
        }
        ?>
    </body>
</html>
